import { AppBaseEntity } from 'src/shared/database/baseEntity';
import { Column, Entity } from 'typeorm';

@Entity({
  name: 'cart_items',
  comment: '购物车项表',
})
export class CartItem extends AppBaseEntity {
  @Column({
    comment: '用户id',
    name: 'user_id',
  })
  userId: number;

  @Column({
    comment: '商品id',
    name: 'product_id',
  })
  productId: number;

  @Column({
    comment: 'SKU id',
    name: 'sku_id',
  })
  skuId: number;

  @Column({
    comment: '商品数量',
    name: 'quantity',
  })
  quantity: number;
}
